package com.example.demo3.controller;

import com.example.demo3.mapper.UserMapper;
import com.example.demo3.pojo.User;
import com.example.demo3.service.UserService;
import com.example.demo3.service.impl.UserServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

//以json格式或字符串格式回写
@RestController
public class democontroller {

    @Autowired
    private UserService userService;

    @RequestMapping("/quick")
    public List<User> queryUserList(){
        List<User> users = userService.queryUserList();

        return users;

    }

    @GetMapping("/getAll")
    public List<User> getAll(){
        List<User> users = userService.list();

        return users;
    }

    @PostMapping("/test")
    public User test() {
        List<User> users = userService.
    }

}